<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <%@include file="../../common/Include_input_head.jsp" %>

    <title>维护菜单</title>

    <script type="text/javascript">
        detailPageStyle();

        function doSave() {

            if (!checkInput("menuname", "菜单名称不能为空！")) {
                return false;
            }
            if (!checkInput("ordernum", "排序值不能为空！")) {
                return false;
            }
            return super_doSave();
        }

        var tem_valueObjid = "tem_valueObjid";
        var tem_nameObjid = "tem_nameObjid";
    </script>
</head>

<body style="text-align:center;">
<s:form name="ysform" method="post" theme="simple">
    <s:hidden id="menuid" name="tsysMenu.menuid"/>
    <s:hidden name="tsysMenu.upmenuid"/>
    <s:hidden name="tsysMenu.depth"/>
    <s:hidden name="tsysMenu.belongtoapp"/>
    <input type="hidden" name="tem_nameObjid" id="tem_nameObjid"/>
    <input type="hidden" name="tem_valueObjid" id="tem_valueObjid"/>

    <div class="box1" panelWidth="99%">
        <fieldset>
            　
            <legend>资源信息</legend>
            <table class="tableStyle" transMode="true" footer="normal">

                <tr>
                    <td align="right">类型：</td>
                    <td align="left">
          <span class="float_left">
                  <s:radio id="srctype" name="tsysMenu.srctype" list="getSysCode('zylx')" listKey="id"
                           listValue="caption"/> <label style="color:red">*</label>
          </span>
                        <span class="img_light" title="方法指编程实现的函数；<br>服务指门户上使用的服务；<br>portlet指liferay门户的portlet"></span>
                    </td>
                </tr>

                <tr>
                    <td align="right" width="16%" nowrap="nowrap">名称：</td>
                    <td align="left"><s:textfield id="menuname" name="tsysMenu.menuname" maxlength="25" size="30"
                                                  cssStyle="width: 350px"/> <label style="color:red">*</label></td>
                </tr>

                <tr>
                    <td align="right">URI链接：</td>
                    <td align="left"><s:textfield id="menupath" name="tsysMenu.menupath" maxlength="200" size="80"
                                                  cssStyle="width: 350px"/></td>
                </tr>

                <tr>
                    <td align="right">排序值：</td>
                    <td align="left"><s:textfield id="ordernum" name="tsysMenu.ordernum" maxlength="3" size="6"
                                                  onkeypress="NumberText(event)" cssStyle="width: 350px"/> <label
                            style="color:red">*</label>
                        <font color="#999999">说明：同一层次中数值大的往前排</font></td>
                </tr>

                <tr>
                    <td align="right">状态：</td>
                    <td align="left"><s:radio id="menustate" name="tsysMenu.state" list="#{1:'启用', 0:'禁用'}"
                                              listKey="key" listValue="value"/> <label style="color:red">*</label></td>
                </tr>

                <tr>
                    <td align="right">访问权限：</td>
                    <td align="left">
                        <s:radio name="tsysMenu.isshare" list="#{1:'所有人', 0:'指定角色'}" listKey="key" listValue="value"/>
                        <label style="color:red">*</label></td>
                    <s:property value="sftjdmh"/>

                </tr>
            </table>
        </fieldset>
        <div>
            <fieldset>
                <legend>授权信息</legend>
                <table class="tableStyle cusTreeTable" useColor="false" useHover="false" useClick="false"
                       trClick="true"  ohterClose="false">
                    <tr>
                        <th width="30">操作</th>
                        <th width="100">角色名称</th>
                        <th width="200">所属系统</th>
                        <th width="100">角色状态</th>
                        <th>说明</th>
                    </tr>
                    <s:iterator status="status" value="roleList">
                        <tr>
                            <td><span class="img_add2 hand" title="点击展开"></span></td>
                            <td><s:property value="rolename"/></td>
                            <td><s:property value="belongtoapp"/> </td>
                            <td><s:if test="state == 1 ">启用</s:if><s:else>禁用</s:else></td>
                            <td><s:property value="memo"/></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td colspan="4">
                                <table class="tableStyle">
                                    <tr>
                                        <th style="width: 33%;text-align: center">用户名称</th>
                                        <th style="width: 33%;text-align: center">用户帐号</th>
                                        <th style="width: 33%;text-align: center">用户状态</th>
                                    </tr>
                                    <s:iterator value="userList" status="statu">
                                    <tr>
                                        <td style="width: 33%;text-align: center" ><s:property value="username"/> </td>
                                        <td style="width: 33%;text-align: center" ><s:property value="userloginid"/> </td>
                                        <td style="width: 33%;text-align: center"><s:if test="state == 0 ">禁用</s:if><s:else>启用</s:else></td>
                                    </tr>
                                    </s:iterator>
                                </table>
                            </td>
                        </tr>
                    </s:iterator>
                </table>
            </fieldset>
        </div>
        <div class="padding_top10">
            <table class="tableStyle" transMode="true">
                <tr>
                    <td colspan="4">
                        <input type="button" id="ysSaveButton" value=" 保 存 " onclick="doSave()"/>&nbsp;

                        <input type="button" value=" 关  闭 " onclick="parent.closeEntityWindow()"/>

                        <s:if test="actionErrors.size()>0 || actionMessages.size()>0 || fieldErrors.size()>0">
							<span id="SystemErrorMessage">
								<s:actionerror/>
								<s:actionmessage/>
								<s:fielderror/>
							</span>
                        </s:if>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</s:form>

</body>
</html>
